package com.bl.student.dao.model;

import com.bl.student.common.enums.ApplyType;
import com.bl.student.dao.model.converter.DatetimeConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * Created by yujingyi on 2018/3/21.
 */
@Entity
@Data
@Table(name = "USER_APPLY")
@ApiModel(value = "UserApplyEntity", description = "用户报名表")
@DynamicInsert
@DynamicUpdate
public class UserApplyEntity {
    @Id
    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "用户id")
    @Column(name = "user_id")
    private String userId;

    @ApiModelProperty(value = "报名的内容id(非详情ID,列表中的项目的id)")
    @Column(name = "biz_id")
    private String bizId;

    @Enumerated(EnumType.STRING)
    @ApiModelProperty(value = "报名项目类型: PLAN 央清计划")
    private ApplyType type;

    @ApiModelProperty(value = "创建时间")
    @Column(name = "create_time")
    @Convert(converter = DatetimeConverter.class)
    private Long createTime;

    @ApiModelProperty(value = "修改时间")
    @Column(name = "update_time")
    @Convert(converter = DatetimeConverter.class)
    private Long updateTime;
}
